#include<stdio.h>
main()
{
	int a,b,c;
	b=15;
	scanf("%x",&a);
	c=a+b;
	printf("%d\n%d\n",a,c);
}